const express = require('express');
const router = express.Router();
const Blog = require('./../../mongoModuels/stateg/blog');

router.get('/nav', (req, res) => {
    let query = Blog.headNav.find({});
    query.select('-creationTime');
    query.exec({}, (err, data) => {
        if(err) {
            res.json({
                status: 0,
                message: err
            })
        } else {
            res.json({
                status: 1,
                message: '操作成功',
                data
            })
        }
    });
})

module.exports = router;